<template>
  <div>
    <Product-showcase v-if="interBool" @send="changeInter" />
    <Add-goods v-else :goods-id="id" @send="changeInter" />
  </div>
</template>

<script>
  export default {
    components: {
      ProductShowcase: () => import('./conponents/productshowcase.vue'),
      AddGoods: () => import('./conponents/addgoods.vue'),
    },
    data() {
      return {
        interBool: true,
        id: 0,
      }
    },
    methods: {
      changeInter(goodsId) {
        this.interBool = !this.interBool
        this.id = goodsId
      },
    },
  }
</script>

<style scoped></style>
